﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KL.Store.Core.Domain;
using TN.Data;

namespace KL.Store.Data
{
    public class dbProductTab
    {
        #region Get

        public static Product Get(int ProductGroupId, int ProductParentGroupId)
        {
            IList<Product> objectList = new List<Product>();
            SqlHelper.FillList(dbParameters.dsnStore, "SPR_ESTORE_ProductTab_Get", objectList, new object[] { ProductGroupId, ProductParentGroupId });

            return objectList.FirstOrDefault();
        }

        #endregion

        #region GetList

        public static IList<ProductTab> GetList(bool NewTab)
        {
            IList<ProductTab> objectList = new List<ProductTab>();
            SqlHelper.FillList(dbParameters.dsnStore, "SPR_ESTORE_ProductTab_List", objectList, new object[] { NewTab });

            return objectList;
        }

        #endregion
    }
}
